package com.pda.yuanjing.pages.jdpd.scanf;

import com.pda.yuanjing.beanin.AddCBillBeanIn;
import com.pda.yuanjing.beanout.JDBeanDNewOut;
import com.pda.yuanjing.thread.CodeBeans;
import com.public_module.basemvp.present.BasePresenter;

import java.util.List;

public class ScanfPresent extends BasePresenter<ScanfModel, ScanfView> implements ScanfModel.CallBack {

    public void confirePD(AddCBillBeanIn addCBillBeanIn) {
        view.showProgress();
        model.comfirePD(addCBillBeanIn,this);
    }

    public void scanfBM(String batchID, String  jieDianName, String billListID, String codes,String selectMsg, CodeBeans codeBeans) {
        model.scanfCodeBM(batchID,  jieDianName, billListID, codes,selectMsg,codeBeans,this);
    }

    @Override
    public void onshowres(String str) {
        if(view!=null)
        {
            view.hideProgress();
            view.showres(str);
        }
    }

    @Override
    public void onshowSuccessres(String str) {
        if(view!=null)
        {
            view.hideProgress();
            view.showSuccessres(str);
        }
    }

    @Override
    public void onshowSuccessres(List<JDBeanDNewOut.DataBean> list) {
        if(view!=null)
        {
            view.hideProgress();
            view.showSuccessres(list);
        }
    }
}


